import request from '@/utils/request'

// 查询档案类别列表
export function listTreemain(query) {
  return request({
    url: '/system/treemain/list',
    method: 'get',
    params: query
  })
}

// 查询档案类别详细
export function getTreemain(id) {
  return request({
    url: '/system/treemain/' + id,
    method: 'get'
  })
}

// 新增档案类别
export function addTreemain(data) {
  return request({
    url: '/system/treemain',
    method: 'post',
    data: data
  })
}

// 修改档案类别
export function updateTreemain(data) {
  return request({
    url: '/system/treemain',
    method: 'put',
    data: data
  })
}

// 删除档案类别
export function delTreemain(id) {
  return request({
    url: '/system/treemain/' + id,
    method: 'delete'
  })
}
